package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo2 {
    public static void main(String[] args) throws IOException {
        Thread t1 = new Thread(){
            @Override
            public void run() {
                Thread thread = Thread.currentThread();
                try {
                   PrintWriter printWriter = new PrintWriter(new BufferedWriter(
                                               new OutputStreamWriter(
                                      new FileOutputStream("note.txt", true), StandardCharsets.UTF_8)));
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                }
            }
        };
        t1.start();

    }
}
